package com.way.controller;

import com.way.CommonResult;
import com.way.service.IWeiXinMessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class WeiXinMessageController {

    @Autowired
    private IWeiXinMessageService weiXinMessageService;

    @GetMapping("/accessToken")
    public CommonResult getAccessToken() {
        return CommonResult.success(weiXinMessageService.getAccessToken());
    }

    @GetMapping("/weiXinMessage")
    public CommonResult sendWeiXinMessage() {
        return CommonResult.success(weiXinMessageService.sendWeiXinMessage());
    }
}
